//
//  DownLoadUtils.h
//  LobbyGame
//
//  Created by Bad on 2018/5/2.
//  Copyright © 2018年 boxian. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface DownLoadUtils : NSObject

+ (NSURLSessionDownloadTask *)downloadWithURL:(NSString *)url
                                     toFilePath:(NSString *)toFilePath
                                     fileName:(NSString *)fileName
                                     progress:(void (^)(NSProgress *downloadProgress))progress
                            completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler;


+ (NSURLSessionDownloadTask *)resumeData:(NSData *)data
                                toFilePath:(NSString *)toFilePath
                                progress:(void (^)(NSProgress *downloadProgress))progress
                       completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler;

@end
